1. Technical Field of the Invention
The present invention relates generally to electronic control apparatus which can on-board rewrite software therein. More particularly, the invention relates to an electronic engine control apparatus for controlling an engine of a motor vehicle, which can on-board rewrite engine control software therein and have an improved configuration for ensuring excellent startability of the engine.
2. Description of the Related Art
A conventional electronic control apparatus for controlling an engine of a motor vehicle includes a first storage means that is made up of an electrically rewritable and nonvolatile memory, such as a flash memory or an EEPROM (Electrically Erasable Programmable Read-Only Memory). The electronic control apparatus stores in the first storage means engine control software which consists of programs and data for controlling the engine. Further, the electronic control apparatus can on-board rewrite (i.e., rewrite in an on-board condition where the first storage means remain installed in the apparatus) the engine control software in response to a rewrite request from an external apparatus. (A reference can be made, for example, to Japanese Patent Application Publication No. 2002-149432.)
In such an electronic control apparatus, among data which is generated by executing the engine control software, retention data is stored in a second storage means which can retain its contents when power to the electronic control apparatus is removed. The second storage means may be made up of, for example, a power-backed up RAM or an electrically rewritable and nonvolatile memory. The retention data denotes, hereinafter, data that has to be retained in the electronic control apparatus even when power supply to the apparatus is stopped. The retention data may include, for example, learning values and diagnostic information (or diagnostic codes).
Moreover, when the engine control software is rewritten in the first storage means, the algorithm of that part of the engine control software which uses or updates the retention data is accordingly changed. Therefore, in such a case, it is necessary to initialize the retention data in the second storage means.
To this effect, in the electronic control apparatus disclosed in Japanese Patent Application Publication No. 2002-149432, the content of an update mark stored in the first storage means is changed from “not-updated” to “updated” in the process of rewriting the engine control software. Further, when the electronic control apparatus is activated upon turning on an ignition switch, the content of the update mark is checked. If it is checked out as being “updated”, then the retention data is initialized in the second storage means and the update mark is changed backed to “not-updated”.
With the above configuration, the retention data is initialized only in the first activation of the electronic control apparatus after the process of rewriting the engine control software; in the second and subsequent activations after the process of rewriting, the retention data stored in the second storage means is continuously utilize without initialization.
On the other hand, when the engine control software stored in the first storage means is rewritten with completely-identical engine control software, it is unnecessary to initialize the retention data in the second storage means. However, with the above configuration, the retention data will be initialized even in such a case.
Such a problem of unnecessary initialization can be solved in light of, for example, an electronic control apparatus disclosed in Japanese Patent Application Publication No. 2000-259420. In the disclosed electronic control apparatus, a first check code storage means stores a first check code corresponding to a control program through execution of which learning values (i.e., retention data) currently stored in a learning value storage means (i.e., the second storage means) have been generated, while a second check code storage means stores a second check code corresponding to a control program that is currently stored in a control program storage means (i.e., the first storage means). When the electronic control apparatus is activated upon turning on an ignition switch, a comparison is made between the first and second check codes. When the two check codes are checked out as being incoincident with each other, it is determined that the current learning values are no longer available and thus have to be initialized in the learning value storage means. After initialization of the learning values, the first check code stored in the first check code storage means is updated with the second check code stored in the second check code storage means. Then, the control program stored in the control program storage means is executed to control an engine of a motor vehicle.
With the above configuration, however, since the execution of the control program starts only after the processes of check code comparison, learning value initialization, and check code update, there will be a delay in initiating control of the engine, making it difficult to immediately start the engine. More specifically, after the electronic control apparatus is activated upon turning on the ignition switch, a starter switch is turned on to start the engine. However, for the above reason, engine control operations including fuel injection will be started only after a certain time period from the turning on of the starter switch, resulting in a delay in starting the engine. This delay will provide an uncomfortable feeling to the driver of the vehicle. In particular, in the case of the learning value storage means being made up of an EEPROM, the time required to initialize the learning values in the EEPROM will be long, thus making the delay remarkable.